package com.czl.module_storehouse.bean;


import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.czl.module_base.bean.CompanyBean;

import java.util.List;

/**
 * @author xubin
 */
public class FacilityListBean implements MultiItemEntity {

    public static final int VIEW_TYPE_PARENT = 1;
    public static final int VIEW_TYPE_CHILDREN = 2;

    private int applicationUseFaclityId;
    private int applicationUseId;
    private int facilityCount;
    //已领用数量
    private int lendNum;
    private int hasUseCount;
    private int sendbackCount;
    private String facilityName;
    private String model;
    private String price;
    private String money;
    private String sortCode;
    private String sortName;
    private String sortModel;
    //申请数量
    private int applyNum;
    private int facilitySum;
    private int sortNum;
    private int unInStoreNum;
    private int classificaitonId;
    private int itemType = VIEW_TYPE_CHILDREN;
    private String workNo;
    private String parentCompanyId;
    private String parentCompanyName;
    private String parentCompanyShortName;
    //0是待审批，1是已通过，2是被驳回，3是撤销
    private int status;
    private String statusName;
    private String classificationName;
    private Integer manageCompanyId;
    private List<CompanyBean> ownershipCompanyList;
    private int sortId;

    public String getClassificationName() {
        return classificationName;
    }

    public void setClassificationName(String classificationName) {
        this.classificationName = classificationName;
    }

    public int getSortId() {
        return sortId;
    }

    public void setSortId(int sortId) {
        this.sortId = sortId;
    }

    public Integer getManageCompanyId() {
        return manageCompanyId;
    }

    public void setManageCompanyId(Integer manageCompanyId) {
        this.manageCompanyId = manageCompanyId;
    }

    public List<CompanyBean> getOwnershipCompanyList() {
        return ownershipCompanyList;
    }

    public void setOwnershipCompanyList(List<CompanyBean> ownershipCompanyList) {
        this.ownershipCompanyList = ownershipCompanyList;
    }

    public String getSortModel() {
        return sortModel;
    }

    public void setSortModel(String sortModel) {
        this.sortModel = sortModel;
    }

    public String getParentCompanyId() {
        return parentCompanyId;
    }

    public String getParentCompanyId2() {
        List<CompanyBean> ownershipCompanyList = getOwnershipCompanyList();
        if (ownershipCompanyList == null || ownershipCompanyList.isEmpty()) {
            return null;
        }
        return ownershipCompanyList.get(0).getCompanyId();
    }

    public void setParentCompanyId(String parentCompanyId) {
        this.parentCompanyId = parentCompanyId;
    }

    public String getParentCompanyName() {
        return parentCompanyName;
    }

    public String getParentCompanyName2() {
        List<CompanyBean> ownershipCompanyList = getOwnershipCompanyList();
        if (ownershipCompanyList == null || ownershipCompanyList.isEmpty()) {
            return null;
        }
        return ownershipCompanyList.get(0).getCompanyName();
    }

    public void setParentCompanyName(String parentCompanyName) {
        this.parentCompanyName = parentCompanyName;
    }

    public String getParentCompanyShortName() {
        return parentCompanyShortName;
    }

    public String getParentCompanyShortName2() {
        List<CompanyBean> ownershipCompanyList = getOwnershipCompanyList();
        if (ownershipCompanyList == null || ownershipCompanyList.isEmpty()) {
            return null;
        }
        return ownershipCompanyList.get(0).getCompanyShortName();
    }

    public void setParentCompanyShortName(String parentCompanyShortName) {
        this.parentCompanyShortName = parentCompanyShortName;
    }

    public String getMoney() {
        return money;
    }

    public void setMoney(String money) {
        this.money = money;
    }

    public String getSortCode() {
        return sortCode;
    }

    public void setSortCode(String sortCode) {
        this.sortCode = sortCode;
    }

    public String getSortName() {
        return sortName;
    }

    public void setSortName(String sortName) {
        this.sortName = sortName;
    }

    public int getSortNum() {
        return sortNum;
    }

    public void setSortNum(int sortNum) {
        this.sortNum = sortNum;
    }

    public int getUnInStoreNum() {
        return unInStoreNum;
    }

    public void setUnInStoreNum(int unInStoreNum) {
        this.unInStoreNum = unInStoreNum;
    }

    public int getClassificaitonId() {
        return classificaitonId;
    }

    public void setClassificaitonId(int classificaitonId) {
        this.classificaitonId = classificaitonId;
    }

    public int getApplyNum() {
        return applyNum;
    }

    public void setApplyNum(int applyNum) {
        this.applyNum = applyNum;
    }

    public String getWorkNo() {
        return workNo;
    }

    public void setWorkNo(String workNo) {
        this.workNo = workNo;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public void setItemType(int itemType) {
        this.itemType = itemType;
    }

    public int getLendNum() {
        return lendNum;
    }

    public void setLendNum(int lendNum) {
        this.lendNum = lendNum;
    }

    public int getApplicationUseFaclityId() {
        return applicationUseFaclityId;
    }

    public void setApplicationUseFaclityId(int applicationUseFaclityId) {
        this.applicationUseFaclityId = applicationUseFaclityId;
    }

    public int getApplicationUseId() {
        return applicationUseId;
    }

    public void setApplicationUseId(int applicationUseId) {
        this.applicationUseId = applicationUseId;
    }

    public int getFacilityCount() {
        return facilityCount;
    }

    public void setFacilityCount(int facilityCount) {
        this.facilityCount = facilityCount;
    }

    public int getHasUseCount() {
        return hasUseCount;
    }

    public void setHasUseCount(int hasUseCount) {
        this.hasUseCount = hasUseCount;
    }

    public int getSendbackCount() {
        return sendbackCount;
    }

    public void setSendbackCount(int sendbackCount) {
        this.sendbackCount = sendbackCount;
    }

    public String getFacilityName() {
        return facilityName;
    }

    public void setFacilityName(String facilityName) {
        this.facilityName = facilityName;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public String getPrice() {
        return price;
    }

    public String getPriceNotNull() {
        return price == null ? "0" : price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    @Override
    public int getItemType() {
        return itemType;
    }

}
